using System;
using System.Collections.Generic;
using System.Text;

namespace Calc.Parser
{
	public class EquationParserException : Exception
	{
		protected string _token = null;

		protected int _index = -1;

		public EquationParserException(string message, LexerToken token)
			: this(message, ( token == null ? "" : token.Token ), ( token == null ? -1 : token.Index ))
		{

		}

		public EquationParserException(string message, string token, int index)
			: base(message)
		{
			_token = token;
			_index = index;
		}

		public string Token
		{
			get { return _token; }
		}

		public int Index
		{
			get { return _index; }
		}
	}
}
